// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
// import iView from 'iview'
import './assets/css/theme.less'
import './api/API'
// import router from './router'
import App from './app/app'
import locale from 'iview/dist/locale/zh-CN'
// import mock from './api/mock'
import VueLazyload from 'vue-lazyload'
import { LoadingPlugin, ToastPlugin, AlertPlugin } from 'vux' // 全局引入 loading/toast/alert

Vue.use(LoadingPlugin)
Vue.use(ToastPlugin)
Vue.use(AlertPlugin)

// Vue.use(iView, {
//     locale
// }) 
// Vue.use(router)
import io from 'vue-socket.io';
Vue.use(io, '127.0.0.1:3000');

Vue.use(VueLazyload, {
    preLoad: 1
})

// mock()
// Vue.prototype.$api = API;



Vue.config.productionTip = false

const main: Vue = new Vue({
    el: '#app',
    template: '<App/>',
    components: { App },
    // router,
    render: h => h(App)
})
export default main